package tw.cuttle.process;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import tw.cuttle.view.JspSupport;
import tw.cuttle.view.VelocitySupport;

public class ViewStrategy {
	private Log logger=LogFactory.getLog(this.getClass());
    public enum TYPE{
	JSP, Velocity
    }
    public EvaluateViewSupport getStrategy(String strategy){
    logger.info("view strategy:"+strategy);
	EvaluateViewSupport support=null;
	if(strategy.equals(TYPE.JSP.name())){
	    support=new JspSupport();
	}else if(strategy.equals(TYPE.Velocity.name())){
	    support=new VelocitySupport();
	}
	return support;
    }
}
